      <main class="mdl-layout__content mdl-color--grey-100" >
      	
        <!-- start mdl grid -->
        <div class="mdl-cell--11-col mdl-grid" style="margin: 20px auto; ">

			<div class="mdl-cell--8-col mdl-cell--8-col-phone mdl-cell" >
				<span><b>当前位置 > </b> 图书分类 </span>
			</div>
			<div class="mdl-cell--4-col mdl-cell--4-col-phone mdl-cell" style="text-align: right;">
				<button id="add-dialog" class="mdl-button mdl-js-button mdl-button--raised mdl-color--cyan-300 mdl-color-text--white">添加</button>
				<button class="mdl-button mdl-js-button mdl-button--raised mdl-color--cyan-300 mdl-color-text--white">删除</button>
			</div>
		</div>

        		<table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-cell--11-col" style="margin: 0 auto;">
			<thead>
			  <tr>
				<th class="mdl-data-table__cell--non-numeric">分类编号</th>
				<th class="mdl-data-table__cell--non-numeric">图书分类名称</th>
				<th class="mdl-data-table__cell--non-numeric">创建时间</th>
				<th class="mdl-data-table__cell--non-numeric">操作</th>
			  </tr>
			</thead>
			<tbody>
			  <foreach name="categorys" item="vo">
			  <tr>
				<td class="mdl-data-table__cell--non-numeric">{$vo.id}</td>
				<td class="mdl-data-table__cell--non-numeric">{$vo.name}</td>
				<td class="mdl-data-table__cell--non-numeric">{$vo.create_time}</td>
				<td class="mdl-data-table__cell--non-numeric">
				  <a href="javascript:void(0)" onclick="editCategory({$vo['id']})">修改</a>
				  <a href="{:U('/Admin/Category/delete', array('id'=>$vo['id']))}">删除</a>
				</td>
			  </tr>
			</foreach>
			</tbody>
        		</table>

		<div class="mdl-cell--11-col" style="margin: 30px auto 30px auto; text-align: center;">
			<button class="mdl-button mdl-js-button mdl-button--icon"><i class="material-icons">skip_previous</i></button>
			<button class="mdl-button mdl-js-button mdl-button--icon">1</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">2</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">3</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">4</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">5</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">6</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">7</button>
			<button class="mdl-button mdl-js-button mdl-button--icon">8</button>
			<button class="mdl-button mdl-js-button mdl-button--icon"><i class="material-icons">skip_next</i></button>
		</div>
      </main>


     <!-- Dialog -->
     <form id="category-form" action="{:U('Admin/Category/add')}" method="post" enctype="multipart/form-data" >
	 <dialog id="dialog-add" class="mdl-dialog" >
		<h4 class="mdl-dialog__title">添加图书分类</h4>
		<div class="mdl-dialog__content">
			<div class="dialog-child-margin-10">
				<div class="mdl-textfield mdl-js-textfield">
				    <input class="mdl-textfield__input" type="text"  id="title" name="title">
				    <label class="mdl-textfield__label" for="name">请输入分类名称</label>
				</div>
				<div>
				  <div class="div"> 
				    <div class="line"> 
					<span class="span"> 
						<input name="" type="text" id="viewfile"
						 onmouseout="document.getElementById('upload').style.display='none';" class="inputstyle" placeholder="请选择图片" /> 
					</span> 
					<label for="unload"  onmouseover="document.getElementById('upload').style.display='block';" class="file1">浏览...</label> 
					<input type="file" onchange="document.getElementById('viewfile').value=this.value;this.style.display='none';"  class="file" id="upload" name="upload" /> 
				    </div> 
				  </div> 
				</div>
				<div class="mdl-textfield mdl-js-textfield">
					<textarea class="mdl-textfield__input" type="text" 
					 	rows= "1" id="description" name="description"></textarea>
					<label class="mdl-textfield__label" 
						for="description">请输入分类描述...</label>
				</div>
			</div>
		</div>
		<div class="mdl-dialog__actions">
			<button type="submit" class="mdl-button">添加</button>
			<button type="button" class="mdl-button close">取消</button>
		</div>

	 </dialog>
     </form>


	 <form id="category-form" action="{:U('/Admin/Category/put')}" method="post" enctype="multipart/form-data" >
	 <dialog id="dialog-edit" class="mdl-dialog" >
		<h4 class="mdl-dialog__title">修改图书分类</h4>
		<div class="mdl-dialog__content">
			<div class="dialog-child-margin-10">
				<div class="mdl-textfield mdl-js-textfield">
				    <input class="mdl-textfield__input" type="text"  id="edit-title" name="title" value="名称">
				    <label class="mdl-textfield__label" for="name">请输入分类名称</label>
				</div>
				<div>
				  <div class="div"> 
				    <div class="line"> 
					<span class="span"> 
						<input name="" type="text" id="edit-viewfile"
						 onmouseout="document.getElementById('edit-upload').style.display='none';" class="inputstyle" placeholder="请选择图片" /> 
					</span> 
					<label for="unload"  onmouseover="document.getElementById('edit-upload').style.display='block';" class="file1">浏览...</label> 
					<input type="file" onchange="document.getElementById('edit-viewfile').value=this.value;this.style.display='none';"  class="file" id="edit-upload" name="upload" /> 
				    </div> 
				  </div> 
				</div>
				<div class="mdl-textfield mdl-js-textfield">
					<textarea class="mdl-textfield__input" type="text" 
					 	rows= "1" id="edit-description" name="description"></textarea>
					<label class="mdl-textfield__label" 
						for="description"></label>
				</div>
			</div>
		</div>
		<div class="mdl-dialog__actions">
			<button type="submit" class="mdl-button">修改</button>
			<button type="button" class="mdl-button close-edit">取消</button>
		</div>

	 </dialog>
	 <input type="hidden" name="id" id="edit-id">
     </form>